All Functions of Week 7

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

mean

{base}

Get mean of a vector

plot

{graphics}

Generic function from base R to produce a plot

get_mode

{rstatix}

Compute the mode in a given vector.

which

{base}

return indexes of TRUE entries of a logical vector

attach

{base}

Attach Set of R Objects to Search Path

factor

{base}

Create a factor

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

lprop

{questionr}

Display row percentages of a two-way frequency table

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

geom_histogram

{GGPLOT2}

Generates a histogram

c

{base}

Combine values/vectors into a vector

ggtitle

{GGPLOT2}

Generates a title for a ggplot graph

unique

{base}

get unique elements

tabulate

{base}

Counts the number of times each integer occurs in an integer-only vector

sd

{stats}

Get standard deviation of a vector

with

{base}

evaluate expression in the context of a data frame

cor

{stats}

Calculate Correlation Matrix

class

{base}

Retrieve class of an R object

par

{graphics}

Set parameters of the plotting device

cor.test

{stats}

Test for Association/Correlation Between Paired Samples

read.spss

{foreign}

Read a .sav file (SPSS data)

addmargins

{stats}

Puts Arbitrary Margins on Multidimensional Tables or Arrays

as.factor

{base}

Coerce a vector to factor

barplot

{graphics}

Plot a simple bar plot

ggplot

{GGPLOT2}

Create a ggplot graph

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

seq

{base}

Create a sequence

tapply

{base}

Create statistical summaries by group based on the levels of one or several factors

xlab

{GGPLOT2}

Label the x axis (ggplot)

which.max

{base}

return index of the largest value in a vector

as.numeric

{base}

Coerce a vector to numeric

order

{base}

Get indexes that will sort a vector

hist

{graphics}

Plot a simple histogram

library

{base}

Load an R package

str

{utils}

Get the structure of an R object

ylab

{GGPLOT2}

Label the y axis (ggplot)

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

round

{base}

Rounds numbers

boxplot

{graphics}

Plot a simple box plot

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

setwd

{base}

Set Working Directory

prop.table

{base}

Transform frequency table into table of proportions

The end!